{% extends "base.html" %}
{% load promgen %}

{% block content %}

<div class="page-header">
  <h1>Hosts</h1>
</div>

{% breadcrumb label="All Hosts" %}

{% include "promgen/pagination_short.html" with page_obj=host_groups %}
<div class="panel panel-default">
    <table class="table table-bordered table-condensed">
      <thead>
        <tr>
          <th>Host</th>
          <th>Farm</th>
        </tr>
      </thead>
{% for name, hosts in host_groups.object_list %}
<tr v-pre>
  <td><a href="{% url 'host-detail' name %}">{{ name }}</a></td>
  <td>
    <ul>
    {% for host in hosts %}
      <li>
        Farm: <a href="{% url 'farm-detail' host.farm.id %}">{{ host.farm }}</a>
        Project: <a href="{% url 'project-detail' host.farm.project.id  %}">{{ host.farm.project.name }}</a>
      </li>
    {% endfor %}
    </ul>
  </td>
</tr>
{% endfor %}
    </table>

</div>
{% include "promgen/pagination_short.html" with page_obj=host_groups %}
{% endblock %}
